Repository navigation
fix: Improve compatibility with Alpine Linux - #68
Conversation
Alpine's `ps` doesn't support the `-x` command. SO suggests `-ef` is more than sufficient as a replacement.
94ea136 to
82dbcd5
Compare
|
Is there anything I can do to help this along? |
Hey, I'm sorry for the delay. My wife and I just had a baby a few weeks ago, and I've taken the last few months off to focus on helping her and now our baby. But, this looks good. I'll merge and release when I get back to my laptop in November |
|
Congrats! |
|
#73 uses the new Litestream IPC endpoints from v0.5.9, so no more specific linux specific commands are needed. |
fractaledmind
left a comment
There was a problem hiding this comment.
Thanks for this, and sorry for the long wait. I can't merge it as it stands: with ps -ef, the first column on macOS and glibc Linux is the UID, not the PID, and process_info takes the first field as the pid (pid, * = line.split(" ")). On those systems the dashboard would report the user id and then run ps -o "state,lstart" <uid>. The test still passes because its stubbed ps output is in the old -ax layout.
ps -eo pid,args puts the PID first on macOS, GNU and (I believe) BusyBox, so it should cover Alpine without breaking the others. If you can confirm it on Alpine, and change the test stub to match the new command's output layout, I'll merge it.
🤖 Generated with Claude Code
ps differs too much across images to parse: BusyBox (Alpine) rejects -x and has no lstart, Debian slim ships no ps at all, and with -ef the first column is the UID on macOS and glibc. On Linux, read argv, state and start time from /proc. On macOS, one ps call with the command name in its own column. Match on the program (argv[0] named litestream, argv[1] replicate) rather than the text "litestream replicate" anywhere in the command line, which also matched shells and editors that mentioned it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
I pushed a change to this branch, building on your fix. Testing in containers showed that
The change:
I checked it with a real process (in a path containing a space) and a decoy shell on 🤖 Generated with Claude Code |
|
Many thanks for following up! I hope all is well with your family. |
|
Yes, my daughter just recently had her 1 year birthday! It is freaking crazy how quickly time flies. |
Alpine's
psdoesn't support the-xcommand. SO suggests-efis more than sufficient as a replacement.